document.addEventListener('DOMContentLoaded', function () {
    let icpElement = document.getElementById('icp');
    let domain = window.location.hostname;
    console.log(domain)
    // domain = abc.www.heijinga.com
    let main_domain = domain.split('.').slice(-2).join('.');
    console.log(main_domain)
    switch (main_domain) {
        case 'heijinga.com':
            icpElement.innerHTML += '闽ICP备19008667号-1';
            break;
        case 'heijinga.net':
            icpElement.innerHTML += '闽ICP备19008667号-3';
            break;
        case 'heijinga.cn':
            icpElement.innerHTML += '闽ICP备19008667号-2';
            break;
        default:
            icpElement.innerHTML += 'ICP备案信息未知';
    }
});